package cloud.xlh.agent;

import java.lang.instrument.Instrumentation;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/5/28 19:45
 * @ Description:
 */
public class TransformAgent {
    public static void premain(String agentArgs, Instrumentation inst) {
        System.out.println("agent main start");
        System.out.println("args:"+agentArgs);
        inst.addTransformer(new MyTransformer(), true);
        //1.加载加密配置文件（路径参数由agentArgs提供）
        //2.解密
        //3.放回指定位置
    }
    public static void agentmain(String agentArgs, Instrumentation instrumentation) {
        System.out.println("agent main start");
        System.out.println("args:"+agentArgs);
    }
}
